@extends('backend.layouts.app')

@section('content')

    <div class="aiz-titlebar text-left mt-2 mb-3">
        <div class="row align-items-center">
            <div class="col">
                <h1 class="h3">{{ translate('Website Header') }}</h1>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-8 mx-auto">
            <div class="card">
                <div class="card-header">
                    <h6 class="mb-0">营销设置</h6>
                </div>
                <div class="card-body">
                    <form action="{{ route('business_settings.update') }}" method="POST" enctype="multipart/form-data">
                    @csrf
                    <!--
					<div class="form-group row">
	                    <label class="col-md-3 col-from-label">{{ translate('Header Logo') }}</label>
						<div class="col-md-8">
		                    <div class=" input-group " data-toggle="aizuploader" data-type="image">
		                        <div class="input-group-prepend">
		                            <div class="input-group-text bg-soft-secondary font-weight-medium">{{ translate('Browse') }}</div>
		                        </div>
		                        <div class="form-control file-amount">{{ translate('Choose File') }}</div>
								<input type="hidden" name="types[]" value="header_logo">
		                        <input type="hidden" name="header_logo" class="selected-files" value="{{ get_setting('header_logo') }}">
		                    </div>
		                    <div class="file-preview"></div>
						</div>
	                </div> -->
                        {{--

                        <div class="form-group row">
                            <label class="col-md-3 col-from-label">{{translate('Settlement income type')}}</label>
                            <div class="col-md-8">
                                    <input type="hidden" name="types[]" value="settle_income_type">
                            <label for="tt1">	 <input type="radio" id="tt1" name="settle_income_type" value="1"  @if( get_setting('settle_income_type') == 1) checked @endif  >{{translate('Direct Earning')}}</label>

                          &nbsp; &nbsp; &nbsp; &nbsp;

                                <label for="tt2"> <input type="radio" id="tt2" name="settle_income_type" value="2"   @if( get_setting('settle_income_type') == 2 ) checked @endif>{{translate('Advance Earning')}}</label>

                            </div>
                        </div>

                        --}}
                        <div class="form-group row">
                            <label class="col-md-3 col-from-label">结算日期</label>
                            <div class="col-md-8">

                                <input type="hidden" name="types[]" value="jiesuanfangshi">

                                <input type="hidden" name="types[]" value="jiesuanfangshi">
                                <label for="tt1"> <input type="radio" id="tt1" name="jiesuanfangshi" value="1"
                                                         @if( get_setting('jiesuanfangshi') == 1) checked @endif >出单日计算</label>

                                &nbsp; &nbsp; &nbsp; &nbsp;

                                <label for="tt2"> <input type="radio" id="tt2" name="jiesuanfangshi" value="2"
                                                         @if( get_setting('jiesuanfangshi') == 2 ) checked @endif >收货日计算</label>

                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-md-3 col-from-label"> 解冻天数</label>
                            <div class="col-md-8">
                                <input type="hidden" name="types[]" value="fday">
                                <input type="text" class="form-control" value="{{ get_setting('fday') }}"
                                       placeholder="解冻天数" name="fday">
                            </div>
                        </div>


                        <div class="border-top pt-3">

                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">注册显示邮箱</label>
                                <div class="col-md-8">
                                    <label class="aiz-switch aiz-switch-success mb-0">
                                        <input type="hidden" name="types[]" value="reg_email">
                                        <input type="checkbox" name="reg_email"
                                               @if( get_setting('reg_email') == 'on') checked @endif>
                                        <span></span>
                                    </label>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">注册显示手机号</label>
                                <div class="col-md-8">
                                    <label class="aiz-switch aiz-switch-success mb-0">
                                        <input type="hidden" name="types[]" value="reg_mobile">
                                        <input type="checkbox" name="reg_mobile"
                                               @if( get_setting('reg_mobile') == 'on') checked @endif>
                                        <span></span>
                                    </label>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">身份证照片</label>
                                <div class="col-md-8">
                                    <label class="aiz-switch aiz-switch-success mb-0">
                                        <input type="hidden" name="types[]" value="reg_idcard">
                                        <input type="checkbox" name="reg_idcard"
                                               @if( get_setting('reg_idcard') == 'on') checked @endif>
                                        <span></span>
                                    </label>
                                </div>
                            </div>


                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">手持身份证照片</label>
                                <div class="col-md-8">
                                    <label class="aiz-switch aiz-switch-success mb-0">
                                        <input type="hidden" name="types[]" value="reg_hand_idcard">
                                        <input type="checkbox" name="reg_hand_idcard"
                                               @if( get_setting('reg_hand_idcard') == 'on') checked @endif>
                                        <span></span>
                                    </label>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">营业执照照片</label>
                                <div class="col-md-8">
                                    <label class="aiz-switch aiz-switch-success mb-0">
                                        <input type="hidden" name="types[]" value="reg_yyzz">
                                        <input type="checkbox" name="reg_yyzz"
                                               @if( get_setting('reg_yyzz') == 'on') checked @endif>
                                        <span></span>
                                    </label>
                                </div>
                            </div>


                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">紧急联系人邮箱</label>
                                <div class="col-md-8">
                                    <label class="aiz-switch aiz-switch-success mb-0">
                                        <input type="hidden" name="types[]" value="reg_jjlxr">
                                        <input type="checkbox" name="reg_jjlxr"
                                               @if( get_setting('reg_jjlxr') == 'on') checked @endif>
                                        <span></span>
                                    </label>
                                </div>
                            </div>


                        </div>

                        <div class="border-top pt-3" style="display:none">


                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">代理账号</label>
                                <div class="col-md-8">
                                    <div class="form-group">
                                        <input type="hidden" name="types[]" value="dl_account">
                                        <input type="text" class="form-control" placeholder="采集的代理账号" name="dl_account"
                                               value="{{ get_setting('dl_account') }}">
                                    </div>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">代理账号</label>
                                <div class="col-md-8">
                                    <div class="form-group">
                                        <input type="hidden" name="types[]" value="dl_pass">
                                        <input type="text" class="form-control" placeholder="采集的代理密码" name="dl_pass"
                                               value="{{ get_setting('dl_pass') }}">
                                    </div>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">代理连接</label>
                                <div class="col-md-8">
                                    <div class="form-group">
                                        <input type="hidden" name="types[]" value="dl_link">
                                        <input type="text" class="form-control" placeholder="代理连接" name="dl_link"
                                               value="{{ get_setting('dl_link') }}">
                                    </div>
                                </div>
                            </div>


                        </div>

                        <div class="border-top pt-3">
                            <div class="form-group row">
                                <label class="col-md-3 col-from-label">企业店标识</label>
                                <div class="col-md-8">

                                    <input type="file" name="reg_logo">
                                    <img src="/images/{{ get_setting('reg_logo') }}" style="width:100px;"/>

                                </div>
                            </div>
                        </div>


                        <div class="form-group row" style="display:none">
                            <label class="col-md-3 col-from-label">Api Url</label>
                            <div class="col-md-8">

                                <input readonly type="text" class="form-control"
                                       value="<?php echo "https://" . $_SERVER['HTTP_HOST'] . '/api'; ?>"/>


                            </div>
                        </div>

                        <div class="form-group row" style="display:none">
                            <label class="col-md-3 col-from-label"> 采集Key</label>
                            <div class="col-md-8">
                                <input type="hidden" name="types[]" value="caiji_key">
                                <input type="text" class="form-control" value="{{ get_setting('caiji_key') }}"
                                       placeholder="采集Key" name="caiji_key">


                            </div>
                        </div>


                        <div class="form-group row">
                            <label class="col-md-3 col-from-label">直属上一级分佣（%） </label>
                            <div class="col-md-8">
                                <input type="hidden" name="types[]" value="profit_level1">
                                <input type="text" class="form-control" value="{{ get_setting('profit_level1') }}"
                                       placeholder="" name="profit_level1">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-3 col-from-label">直属上二级分佣（%）  </label>
                            <div class="col-md-8">
                                <input type="hidden" name="types[]" value="profit_level2">
                                <input type="text" class="form-control" value="{{ get_setting('profit_level2') }}"
                                       placeholder="" name="profit_level2">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-md-3 col-from-label">直属上三级分佣（%）  </label>
                            <div class="col-md-8">
                                <input type="hidden" name="types[]" value="profit_level3">
                                <input type="text" class="form-control" value="{{ get_setting('profit_level3') }}"
                                       placeholder="" name="profit_level3">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-from-label">{{translate('Google Code')}}</label>
                            <div class="col-sm-9">
                                <input type="text" name="google_code" class="form-control" value="">
                            </div>
                        </div>

                        <div class="text-right">
                            <button type="submit" class="btn btn-primary">{{ translate('Update') }}</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

@endsection
